public class HomeWork07_01{
    public static void main(String[] args){
        Human zhangSan = new Human("张三");
        Dog daHuang = new Dog("大黄");
        
        zhangSan.walk();
        daHuang.bite(zhangSan);
        zhangSan.hit(daHuang);
        daHuang.run();
    }
}

class Human{
    String name;
    
    Human(String n){
        this.name = n;
    }
    void walk(){
        System.out.println(this.name + "在散步");
    }
    void hit(Dog badDog){
        System.out.println(this.name + "打了" + badDog.name);
    }
}

class Dog{
    String name;
    
    Dog(String n){
        this.name = n;
    }
    void run(){
        System.out.println(this.name + "跑了");
    }
    void bite(Human unluckyHuman){
        System.out.println(this.name + "咬了" + unluckyHuman.name);
    }
}